package com.starhub.engine.directory.result;

import com.starhub.engine.document.entity.DocumentShare;
import lombok.Data;

@Data
public class DirectoryShareDealResult {
    private boolean success;
    private String message;
    private Long id;
    private DocumentShare data;

    public static DirectoryShareDealResult success(Long id) {
        DirectoryShareDealResult result = new DirectoryShareDealResult();
        result.setSuccess(true);
        result.setId(id);
        return result;
    }

    public static DirectoryShareDealResult success(String message) {
        DirectoryShareDealResult result = new DirectoryShareDealResult();
        result.setSuccess(true);
        result.setMessage(message);
        return result;
    }

    public static DirectoryShareDealResult success(Long id, DocumentShare data) {
        DirectoryShareDealResult result = new DirectoryShareDealResult();
        result.setSuccess(true);
        result.setId(id);
        result.setData(data);
        return result;
    }

    public static DirectoryShareDealResult fail(String message) {
        DirectoryShareDealResult result = new DirectoryShareDealResult();
        result.setSuccess(false);
        result.setMessage(message);
        return result;
    }
}
